﻿using System.IO;
using CID.Execution.Agent.PackageHandling;
using NUnit.Framework;

namespace CID.Execution.Agent.Tests.PackageHandling
{
    [TestFixture]
    class ZIPPackageHandlingTokenTests : BaseAgentTests
    {
        private const string TempPath = @"C:\WorkingDirectory\Temp";
        private const string PackagePath = @"C:\WorkingDirectory\Temp\Package.zip";
        private const string TargetDirectorySubpath = "Package";
        
        [Test]
        public void CreateNew_ShouldSucceed()
        {
            var targetDirectoryPath = Path.Combine(TempPath, TargetDirectorySubpath);

            var token = new ZIPPackageHandlingToken(TempPath, PackagePath, TargetDirectorySubpath);

            Assert.AreEqual(TempPath, token.TempPath);
            Assert.AreEqual(targetDirectoryPath, token.PackagePath);
            Assert.AreEqual(targetDirectoryPath, token.TargetDirectoryPath);
            Assert.AreEqual(PackagePath, token.SourceFilePath);
            Assert.AreEqual(PackagePath, token.OriginalPackagePath);
        }
    }
}
